package com.kitty.game.market.model;

import java.util.LinkedList;
import java.util.List;


public class MarketTransactionBox {

    /**
     * 摆摊的交易记录
     */
    private List<MarketTransactionRecord> baiTanRecords = new LinkedList<>();

    /**
     * 珍宝的交易记录
     */
    private List<MarketTransactionRecord> zhenBaoRecords = new LinkedList<>();

    public List<MarketTransactionRecord> getBaiTanRecords() {
        return baiTanRecords;
    }

    public void setBaiTanRecords(List<MarketTransactionRecord> baiTanRecords) {
        this.baiTanRecords = baiTanRecords;
    }

    public List<MarketTransactionRecord> getZhenBaoRecords() {
        return zhenBaoRecords;
    }

    public void setZhenBaoRecords(List<MarketTransactionRecord> zhenBaoRecords) {
        this.zhenBaoRecords = zhenBaoRecords;
    }

    public void addBaiTanRecord(MarketTransactionRecord record) {
        if (baiTanRecords.size() > 30) {
            baiTanRecords.remove(0);
        }
        baiTanRecords.add(record);
    }

    public void addZhenBaoRecord(MarketTransactionRecord record) {
        if (zhenBaoRecords.size() > 15) {
            zhenBaoRecords.remove(0);
        }
        zhenBaoRecords.add(record);
    }

}
